import { createRouter, createWebHashHistory } from "vue-router";

let routes = [
  {
    path: "/login",
    component: () => import("../views/login/login.vue"),
  },
  {
    path: "/",
    redirect: "/home",
    component: () => import("../views/layout/index.vue"),
    children: [
      {
        path: "/home",
        component: () => import("../views/home/home.vue"),
      },
      {
        path: "/wd",
        component: () => import("../views/wd/wd.vue"),
      },
      {
        path: "/video",
        component: () => import("../views/video/video.vue"),
      },
      {
        path: "/my",
        component: () => import("../views/my/my.vue"),
      },
    ],
  },
  {
    path: "/search",
    component: () => import("../views/search/search.vue"),
  },
  {
    path: "/article/:id",
    component: () => import("../views/article/article.vue"),
  },
];
let router = createRouter({
  history: createWebHashHistory(),
  routes,
});

export default router;
